<html>
<head>
<meta http-equiv="content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
*{
	margin:0px;
	padding:0px;
}
body{
	font-size:12px;
	font-family:"宋体",Arial, Helvetica, sans-serif;
}
img{
	border:0px none;
}
table{
	border-collapse:collapse;border-spacing:0;
}
th,td{padding:5px}
input{
	outline:none;
}
input.txt {background-color: #f9f9f9;border: 1px solid #CCCCCC;border-radius: 2px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset;color: #666666;font-family: Arial,Verdana,'Helvetica Neue',Helvetica,Arial,Geneva,sans-serif;font-size: 12px;height: 26px;margin-bottom: 6px;margin-right:6px;outline: medium none;padding: 4px;transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;_border:1px #d2d2d2 solid; _line-height:24px; _padding:0 5px; _height:24px;_background:url(../images/inputbg.gif); _width:100px;}
textarea {background-color: #f9f9f9;border: 1px solid #CCCCCC;border-radius: 2px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset;color: #666666;font-family: Arial,Verdana,'Helvetica Neue',Helvetica,Arial,Geneva,sans-serif;font-size: 12px;margin-bottom: 6px;outline: medium none;padding: 4px;transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;}
textarea{vertical-align: middle;}
input.txt:focus, textarea:focus {background-color: #FCFDFF;border: 1px solid #A1D0FF;box-shadow: 0 0 2px #80BFFF, 0 1px 2px rgba(0, 0, 0, 0.15) inset;color: #000000;}

select {width:150px;background-color: #f9f9f9;border: 1px solid #CCCCCC;border-radius: 2px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset;color: #666666;font-family: Arial,Verdana,'Helvetica Neue',Helvetica,Arial,Geneva,sans-serif;font-size: 12px;height: 26px;margin-right:6px;margin-bottom: 6px;outline: medium none;padding: 4px;transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;}
select:focus {background-color: #FCFDFF;border: 1px solid #A1D0FF;box-shadow: 0 0 2px #80BFFF, 0 1px 2px rgba(0, 0, 0, 0.15) inset;color: #000000;}
ul{
	list-style:none;
}

a {
    color: #252525;
    text-decoration: none;	
}
a:hover {
    color: #CC0000;
    text-decoration: none;
}
</style>

<style>
.divstart_publish {
    background-color: #E3E9EE;

    text-align: left;
    width: 900px;
}
.divstart_publish .divstart_bd {
	padding-left:180px;
	padding-bottom:0px;	
	margin:10px 10px;
    border: 1px solid #C7CBD1;
    background: url("<?=$this->_webroot('divstart/left.png')?>") repeat-y scroll 0 0 transparent;	
    background-color: #fff;	
}
.divstart_publish .divstart_bd .form{height:auto;overflow:hidden;margin:10px 10px 10px 0;}
.divstart_publish .divstart_bd .form table tr{border-top:1px dashed #c1d3e7;}
.divstart_publish .divstart_bd .form {padding:7px 0;border-bottom:1px dashed #c1d3e7;}
.divstart_publish .divstart_bd .form input,
.divstart_publish .divstart_bd .form TEXTAREA,
.divstart_publish .divstart_bd .form select{
    padding:4px;
}
.divstart_publish .divstart_bd .form .label{
	display:block;
	float:left;
	width:130px;
	text-align:right;
	font-size:14px;
	font-weight:bold
}
.divstart_publish .divstart_bd .form em{
	font-size:12px;
	font-weight:normal;
	font-style:normal;
}
.divstart_publish .divstart_bd .form .btn{
    background-color: #4db1e0;
	background: linear-gradient(to bottom, #4482c9 0%, #245d9f 100%) repeat scroll 0 0 transparent;
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4482c9',endColorstr='#245d9f',GradientType=0);
	color:#fff;
	font-size:14px;
	font-weight:bold;
	border:1px solid #244d7c;
	padding:5px 15px;
	padding:1px solid #538ed0;
}
.divstart_publish .divstart_left {
	display: inline;
    float:left;
	width:170px;
	margin-left:-180px;
}
.divstart_publish .divstart_left ul  {
	list-style:none;
	margin-top:15px;		
}
.divstart_publish .divstart_left ul li {
	margin-left:2px;	
 	padding-left:10px;	
    height:30px; 
    width:153px;	
    line-height: 30px;
    font-size: 15px;	
}
.divstart_publish .divstart_left ul li.cur {
    background-color: #fff;
    border-left: 5px solid #4380C0;	
    border-top: 1px solid #C7CBD1;
    border-bottom: 1px solid #C7CBD1;	
 	padding-left:6px;		
}
.divstart_publish .divstart_left ul li.cur a {	
    font-size: 14px;
    font-weight: bold;	
    color: #4380C0;	
    text-decoration: none;	
}
.divstart_publish .divstart_left ul li a:hover {	
    font-size: 14px;
    font-weight: bold;	
    color: #4380C0;	
    text-decoration: none;	
}
.clear{
	height:0px;
	overflow:hidden;
	/*clear:both;*/
}
.divstart_publish .divstart_right {
    background-color: #fff;
    /*float:right;*/
	width:690px;
	margin-right:10px;	
}
.divstart_publish .divstart_right .divstart_title {
    font-size: 14px;
    font-weight: bold;	
    color: #252525;	
	margin-top:20px;	
}
.divstart_publish .divstart_right .divstart_tip {
    background-color: #F0F9FA;
	margin-top:5px;
    border: 1px dashed #95BEED;	
}
.divstart_publish .divstart_right .divstart_tip span{
	margin-left:10px;
 	padding-left:10px;	    	
    width:40px;
	height:25px;
    line-height: 25px;	
    color: #fff;
    font-size: 14px;
    font-weight: bold;	
    background-color: #3D74B5;	
	display:block;	
}
.divstart_publish .divstart_right .divstart_tip h3{
	margin-left:10px;  
	margin-top:10px;   	
    color: #252525;
    font-size: 15px;
    font-weight: bold;			
}
.divstart_publish .divstart_right .divstart_tip p{
	padding:10px 0 10px 10px;
    color: #252525;
    font-size: 14px;		
}
.divstart_publish .divstart_right .divstart_config {
    background-color: #F0F9FA;
	margin-top:10px;
    border: 1px solid #86ADD8;		
    padding-bottom:10px;
}
.divstart_publish .divstart_right .divstart_config .title{
    background: url("<?=$this->_webroot('divstart/config.png')?>") repeat-x scroll 0 0 transparent;
	height:35px;
    border-bottom: 1px solid #86ADD8;	
    line-height: 35px;		
	display:block;	
    font-size: 14px;
    color: #252525;	
	padding-left:10px;	
}
.divstart_publish .divstart_right .divstart_config .title span{
    font-weight: bold;	
}
.divstart_publish .divstart_right .divstart_config .filed{
	padding:10px 0 10px 10px;
    font-size: 14px;
    color: #252525;	
}
.divstart_publish .divstart_right .divstart_config .filed span{
    font-weight: bold;	
}
.divstart_publish .divstart_right .divstart_config .filedtip{
	margin-top:6px;
 	padding:10px 10px; 
    border: 1px solid #A1C1E6;			
    font-size: 14px;
    color: #3D75B6;	
	margin-left:10px;	
	margin-right:10px;
    background-color: #fff;	
    position: relative;		
}
.divstart_publish .divstart_right .divstart_config .linetip {
    border-top: 1px dashed #95BEED;
	height:1px;
	margin-top:10px;
	margin-left:10px;	
	margin-right:10px;	
}

.divstart_publish .divstart_right .divstart_config .filedtip i{	
    background: url("<?=$this->_webroot('divstart/tip.png')?>") no-repeat scroll 0 0 transparent;
    height: 8px;
    width:10px;
    position: absolute;
    left: 15px;
    top: -7px;	
}
.divstart_publish .divstart_right .divstart_config .filedtip span{
    font-weight: bold;	
}

</style>
</head>
<body>

<div class="divstart_publish" >
		<div class="divstart_bd">		
		    <div class="divstart_left">
			    <ul>
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanageedit/?<?php echo $urlstr ; ?>" target="_self">标签修改</a></li>
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanageactiveedit/?<?php echo $urlstr ; ?>"   target="_self">标签时间控制</a></li>
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanagetableedit/?<?php echo $urlstr ; ?>"   target="_self">表单数据调用</a></li>
                    <li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanagetableuseredit/?<?php echo $urlstr ; ?>"   target="_self">用户数据修改</a></li>
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanagecacheedit/?<?php echo $urlstr ; ?>"   target="_self">缓存数据调用</a></li>											 
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanagehtmledit/?<?php echo $urlstr ; ?>"   target="_self">模板修改</a></li>
					<li class="cur" ><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanageadplaceedit/?<?php echo $urlstr ; ?>"   target="_self">广告调用</a></li>					
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/viewmanagelabeledit/?<?php echo $urlstr ; ?>"   target="_self">Labels修改</a></li>	
					<li><a href="<?php echo $this->base;?>/index.php/tagsedit/icondatalist/?<?php echo $urlstr ; ?>"   target="_self">缓存数据管理</a></li>													  
					<!-- <li><a href="<?php echo $fromurl ; ?>"   target="_self">返回主站</a></li>--> 					
				</ul>
			</div>
		    <div class="divstart_right">
			    <div class="divstart_title">广告调用</div> 				

			</div>
		    <div class="clear"></div>	
		    <div  class="form">


<?php 

if(!isset($data['iconname'])) { $data['iconname'] ='';} 
if(!isset($data['description'])) { $data['description'] ='';} 
if(!isset($data['iconcontent'])) { $data['iconcontent'] ='';} 
if(!isset($data['config']['tablename'])) { $data['config']['tablename'] ='';} 
if(!isset($data['config']['fields'])) { $data['config']['fields'] ='';} 
if(!isset($data['config']['order'])) { $data['config']['order'] ='';} 
if(!isset($data['config']['limit'])) { $data['config']['limit']='';} 
if(!isset($data['config']['conditions'])) { $data['config']['conditions']='';} 
if(!isset($data['config']['pageurl'])) { $data['config']['pageurl']='';} 
if(!isset($data['config']['cachedatadir'])) { $data['config']['cachedatadir']='';} 
if(!isset($data['config']['cachefields'])) { $data['config']['cachefields']='';} 
if(!isset($data['config']['icondata'])) { $data['config']['icondata']='';} 
if(!isset($data['config']['iconfields'])) { $data['config']['iconfields']='';} 
if(!isset($data['config']['labels'])) { $data['config']['labels']='';} 
if(!isset($data['config']['htmlname'])) { $data['config']['htmlname']='';} 
if(!isset($data['config']['htmlconfig'])) { $data['config']['htmlconfig']='';} 

?>  


<form action="<?php echo $this->base; ?>/index.php/tagsedit/viewmanageadplaceedit" method="post" enctype="multipart/form-data" name="form1"  onSubmit="return post(this);">

<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center"  class="table_style">
<tbody>


<tr >
	<td colspan="2">

    <div id="shifouxianshi" ></div>

<iframe id="likeajaxform"  width="100%" height="250px"  marginwidth="0" marginheight="0" frameborder="0" scrolling="auto"  src="<?php echo $this->_url('tagsedit/viewmanageadplaceedit?dopost=getadplace');?>" ></iframe>
	
 <SCRIPT LANGUAGE="JavaScript">
<!--
function get_obj(obj){
   return document.getElementById(obj);
}


function adplacecha(va){ //v3.0
  if (va!=''){
  	if(get_obj('tplpart_1').value==''){
		get_obj('tplpart_1').value=va;
	}else{
		vb=get_obj('tplpart_1').value;
		var newstr=va.replace('<\!\-\-广告开始\-\->','');
		newstr=newstr.replace('<\!\-\-广告结束\-\->','');
		if(vb.indexOf(newstr) > 0){
		    alert(newstr+",已经存在了,不能雷同");
			return ;
		}
		get_obj('tplpart_1').value+="\r\n"+va;
	}
  } 
}
//-->
</script>	

<table width="100%" border="0" cellspacing="1" cellpadding="3" class="tablewidth">
          <tr  id="TRtpl_1">
            <td >
			<textarea name="data[tplpart_1]" id="tplpart_1" cols="90" rows="8" style="height:250px;"><?php echo $code ; ?></textarea>
            </td>

          </tr>

          <tr >
            <td > 
<input type="radio" name="data[mokuai]" value="1"  onclick="form_choose('1')"  >创建&nbsp;&nbsp;&nbsp;<input type="radio" name="data[mokuai]" value="0"  checked   onclick="form_choose('0')" >修改
            </td>
          </tr>

          <tr  id="field_form_1"  style="display:none;">
            <td > 

文件名：<input type="text" name="data[filename]" size="60" value="<?php echo $htmlname ; ?>" >

            </td>
          </tr>

        </table>


      </td>

    </tr>

</table>


    
    </td>
</tr>

									 
<tr>
	<td>&nbsp;</td>
	<td>
	<input type="hidden" name="data[pagename]" value="<?php echo $pagename ; ?>" />
	<input type="hidden" name="data[strtempdata]" value="<?php echo $strtempdata; ?>" />
	<input type="hidden" name="data[fromurl]" value="<?php echo $weburl; ?>" />
	
	<input type="hidden" name="data[compeld]" value="<?php echo $compeld; ?>" />	
	<input type="hidden" name="data[webroot]" value="<?php echo $webroot; ?>" />
	<input type="hidden" name="data[app]" value="<?php echo $app; ?>" />
	<input type="hidden" name="data[act]" value="<?php echo $act; ?>" />
	
	<input type="hidden" name="dopost" value="post" />	
	
	<input type="submit" value="提交"  class="btn"></td>
</tr>
</tbody></table>
</form>                                 
 
   <SCRIPT LANGUAGE="JavaScript"> 

<!--
function get_obj(obj){
   return document.getElementById(obj);
}
 
function form_choose(t)
{

	if(t=='1')
	{
		get_obj('field_form_1').style.display='';		    
	}else
	{
		get_obj('field_form_1').style.display='none';		    
	}	

}
form_choose('0');
//-->
</SCRIPT>                                                 
                  					
			
		    </div>		
		</div>
</div>
</body>
</html>